<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<html>
    <head>
        <title>标准函数</title>
    </head>
    <body>

        <c:set var="name" value=" afang " scope="page" />
        <p>
            `${name}` length: ${ fn:length( name ) }
        </p>

        <c:set var="username" value="${ fn:trim( name ) }" scope="page"/>
        <p>
            `${username}` length: ${ fn:length( username ) }
        </p>

        <c:set var="begin" value="${ fn:indexOf( username, 'a') + 1 }" scope="page" />
        <c:set var="surname" value="${ fn:substring( username, begin, fn:length(username) ) }" scope="page"/>

        <p>
            `${surname}` length: ${ fn:length( surname ) }
        </p>

        <jsp:useBean id="list" class="java.util.ArrayList" scope="page"></jsp:useBean>

        <p>
            `${list}` size: ${ fn:length( list ) }
        </p>
    </body>
</html>
